<div ng-include src="tpl/public/header.html"></div>
<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
    <li>妈妈桑</li>
  </ol>
  <form class="form-inline search-box" role="form" ng-submit="search()" novalidate>
    <div class="form-group">
      <input type="text" class="form-control" placeholder="手机号码" ng-model="searchMap.mobile" title="">
    </div>
    <div class="form-group">
      <input type="text" class="form-control" placeholder="姓名" ng-model="searchMap.realName" title="">
    </div>
    <div class="form-group">
      <input type="text" class="form-control" placeholder="所在地" ng-model="searchMap.address" title="">
    </div>
    <div class="form-group">
      <input type="text" class="form-control" placeholder="群名称" ng-model="searchMap.wechatGroup" title="">
    </div>
    <div class="form-group">
      <select type="text" class="form-control" placeholder="性别" ng-model="searchMap.sex" style="width:100px;" ng-options="m.value as m.text for m in dictMap.blindateUserSexModel">
        <option value="">--性别--</option>
      </select>
    </div>
    <div class="form-group">
      <select type="text" class="form-control" placeholder="活动来源" ng-model="searchMap.actCode" style="width:130px;" ng-options="m.value as m.text for m in dictMap.blindateSourceModel">
        <option value="">--活动来源--</option>
      </select>
    </div>
    <div class="form-group">
      <select type="text" class="form-control" placeholder="入群状态" ng-model="searchMap.isJoinWechat" style="width:130px;">
        <option value="">--入群状态--</option>
        <option value="1">已入群</option>
        <option value="0">未入群</option>
      </select>
    </div>
    <div class="form-group">
      <select type="text" class="form-control" placeholder="金融人士" ng-model="searchMap.isFinancing" style="width:130px;">
        <option value="">--金融人士--</option>
        <option value="1">是</option>
        <option value="0">否</option>
      </select>
    </div>
    <div class="form-group">
      <select type="text" class="form-control" placeholder="用户状态" ng-model="searchMap.userStatus" ng-options="m.value as m.text for m in dictMap.dynamicStateModel" style="width:130px;">
        <option value="">--用户状态--</option>
      </select>
    </div>
    <div class="form-group">
    	<label>注册时间：</label>
      从<input type="date" class="form-control" placeholder="开始日期" ng-model="searchMap.createDateStart" title="">
    </div>
    <div class="form-group">
      至<input type="date" class="form-control" placeholder="结束日期" ng-model="searchMap.createDateEnd" title="">
    </div>

    <div class="form-group">
    	<label>生日：</label>
      	<input type="date" class="form-control" placeholder="开始日期" ng-model="searchMap.birthdayStart" title="">
    </div>
    <div class="form-group">
      至<input type="date" class="form-control" placeholder="结束日期" ng-model="searchMap.birthdayEnd" title="">
    </div>

    <button type="submit" class="btn btn-default">查询</button>
  </form>
  <table class="table table-striped table-hover">
    <thead>
    <tr>
      <th width="70" ng-click="orderby('createDate')">注册时间<i class="orderby-icons" ng-class="{'orderby-desc':config.orderParameter=='01' && config.orderType == '01','orderby-asc':config.orderParameter=='01' && config.orderType == '02'}"></i>
      </th>
      <th width="70">手机号码</th>
      <th width="40">姓名</th>
      <th width="40">性别</th>
      <th width="70">生日</th>
      <th width="70">所在地</th>
      <th width="80">自我介绍</th>
      <th width="40">活动来源</th>
      <th width="30">入群状态</th>
      <th width="70">群名称</th>
      <th width="70">金融人士</th>
      <th width="70">用户状态</th>
      <th width="70">操作</th>
    </tr>
    </thead>
    <tbody>
      <tr ng-repeat="li in list">
        <td>{{li.createDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
        <td>{{li.mobile}}</td>
        <td>{{li.realName}}</td>
        <td>{{li.sex | blindateUserSexFilter}}</td>
        <td>{{li.birthday | date:'yyyy-MM-dd'}}</td>
        <td>{{li.address}}</td>
        <td>{{li.remark}}</td>
        <td>{{li.actCode | blindateSourceFilter}}</td>
        <td>{{li.isJoinWechat=='0' ? '未入群' : '已入群'}}</td>
        <td>{{li.wechatGroup}}</td>
        <td ng-click="selectFinBox = true">
          <span ng-if="!selectFinBox">{{li.isFinancing == '1' ? '是' : '否'}}</span>
          <select ng-if="selectFinBox" ng-change="edit('status',li.id)" ng-model='editData.isFinancing'>
            <option value="">选择状态</option>
            <option value="0">否</option>
            <option value="1">是</option>
          </select>
        </td>
        <td ng-click="selectBox = true">
        	<span ng-if="!selectBox">{{li.userStatus | dynamicStateFilter}}</span>
			    <select ng-if="selectBox" ng-change="edit('status',li.id)" ng-model='editData.userStatus' ng-options="m.value as m.text for m in dictMap.dynamicStateModel">
				    <option value="">选择状态</option>
			    </select>
        </td>
        <td>
        	 <a href="javascript:;" ng-click="showHask(li.id)"  ng-if="li.isJoinWechat ==0">用户入群</a>

        	 <a href="javascript:;" ng-click="showHask(li.id,li.wechatGroup)" ng-if="li.isJoinWechat !=0">群修改</a>
        </td>
      </tr>
    </tbody>
  </table>

  <div class="pager-box" ng-include src="'tpl/public/pager.html'" ng-show="list.length > 0"></div>

</div>
<div class="layer-box" ng-show="editQunName">
    <div class="layer-bg"></div>
    <div class="layer-con " style="padding:10px 20px; width:380px; left:45%; top:10px;">
    	<span class="icons-close" title="关闭" ng-click="editQunName = false;" style="top: 0px; right: 8px;">X</span>
	    <form ng-submit="edit('name',_id)">
	    	<h4 class="text-center" style="line-height: 35px">群填写</h4>
	    	<div class="form-group">
	      		<input type="text" class="form-control" placeholder="群名称" ng-model="editData.wechatGroup" title="">
	      		<p style="color: #999;padding-top: 10px">如果多个群请用“,”隔开</p>
	    	</div> 
	    	<button type="submit" class="btn btn-primary">提交</button>           	
	    </form>
    </div>
</div>
